[3.9] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) (#99230)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 10 Nov 2022 15:57:41 +0000 (07:57 -0800)
committerRaspbian forward porter <root@raspbian.org>
Sat, 24 Jan 2026 09:41:14 +0000 (09:41 +0000)
commite7cc8a4132ad651847eb5a466c2c06ec907a0104
tree02ed5976fb0c8a6f98d010cc365b0f5c0b3b11f9
parent722de57aa44f944d0892b7e7c4c14d13d4ae5c1f
[3.9] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) (#99230)

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d)
(cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Gbp-Pq: Name 0011-3.9-gh-98433-Fix-quadratic-time-idna-decoding.-GH-99.patch
Lib/encodings/idna.py
Lib/test/test_codecs.py